<?php
/*
 * TODO: Add copyright message...
 */

/**
 * ShiftExchange domain model
 *
 * @category    RedCross
 * @package     Core_Model
 */
class Core_Model_ShiftExchange extends RedCross_Gateway_Base_ShiftExchange
{
    public function init()
    {
    }

    public function getId()
    {
        return (int)$this->id;
    }

    public function reject()
    {
        // YYYY-MM-DD HH:MI:SS
        $now = date('Y-m-d h:i:s');
        $this->request_handled_time = $now;
        $this->is_accepted = false;
        $this->save();
    }

    public function accept()
    {
        // YYYY-MM-DD HH:MI:SS
        $now = date('Y-m-d h:i:s');
        $this->request_handled_time = $now;
        $this->is_accepted = true;
        $this->save();
    }
}

?>
